import request from '@/utils/axios'
import {
    appUrl
} from '@/utils/env'

export function getModelList(data) {
    return request({
        url: appUrl + '/device/model/search',
        method: 'post',
        data
    })
}
export function getAllModelList() {
    return request({
        url: appUrl + '/device/model/list',
        method: 'post',
        data: {}
    })
}
export function getBrandModelList(brandId) {
    return request({
        url: appUrl + '/device/model/list',
        method: 'post',
        data: {id:brandId}
    })
}

export function addModel(data) {
    return request({
        url: appUrl + '/device/model/create',
        method: 'post',
        data
    })
}

export function editModel(data) {
    return request({
        url: appUrl + '/device/model/update',
        method: 'post',
        data
    })
}

export function getModelInfo(data) {
    return request({
        url: appUrl + '/device/model/info',
        method: 'post',
        data
    })
}

export function deleteModel(data) {
    return request({
        url: appUrl + '/device/model/delete',
        method: 'post',
        data
    })
}